package com.java.netty.nio.netty.protocoltcp;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;

/**
 * @Author: Dgg
 * @Date: 2022/1/24 22:04
 */
public class MyTcpClinetInitiaLizer extends ChannelInitializer<SocketChannel> {
	@Override
	protected void initChannel(SocketChannel ch) throws Exception {
		ChannelPipeline pipeline = ch.pipeline();
		pipeline.addLast(new MyMessageEncoder());
		pipeline.addLast(new MyMessageProtoColDecoder());
		pipeline.addLast(new MyClinetHandler());

	}


}
